home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / falcon / jpeg5abn / djpeg.1 < prev    next >
Text File  |  1995-04-27  |  8KB  |  204 lines

  1. DJPEG(1)                 USER COMMANDS                   DJPEG(1)
  2.  
  3.  
  4.  
  5. NAME
  6.      djpeg - decompress a JPEG file to an image file
  7.  
  8. SYNOPSIS
  9.      djpeg [ _o_p_t_i_o_n_s ] [ _f_i_l_e_n_a_m_e ]
  10.  
  11. DESCRIPTION
  12.      djpeg decompresses the named  JPEG  file,  or  the  standard
  13.      input if no file is named, and produces an image file on the
  14.      standard output.  PBMPLUS (PPM/PGM), BMP, GIF, Targa, or RLE
  15.      (Utah  Raster  Toolkit) output format can be selected.  (RLE
  16.      is supported only if the URT library is available.)
  17.  
  18. OPTIONS
  19.      All switch names may be abbreviated; for example, -grayscale
  20.      may  be  written -gray or -gr.  Most of the "basic" switches
  21.      can be abbreviated to as little as one  letter.   Upper  and
  22.      lower  case  are equivalent (thus -GIF is the same as -gif).
  23.      British spellings  are  also  accepted  (e.g.,  -greyscale),
  24.      though for brevity these are not mentioned below.
  25.  
  26.      The basic switches are:
  27.  
  28.      -colors _N
  29.           Reduce image to at most N  colors.   This  reduces  the
  30.           number  of  colors used in the output image, so that it
  31.           can be displayed on a colormapped display or stored  in
  32.           a colormapped file format.  For example, if you have an
  33.           8-bit display, you'd need to reduce  to  256  or  fewer
  34.           colors.
  35.  
  36.      -quantize _N
  37.           Same as -colors.   -colors  is  the  recommended  name,
  38.           -quantize is provided only for backwards compatibility.
  39.  
  40.      -fast
  41.           Select recommended processing  options  for  fast,  low
  42.           quality  output.   (The  default options are chosen for
  43.           highest quality output.)  Currently, this is equivalent
  44.           to -dct fast -nosmooth -onepass -dither ordered.
  45.  
  46.      -grayscale
  47.           Force gray-scale output even if  JPEG  file  is  color.
  48.           Useful  for viewing on monochrome displays; also, djpeg
  49.           runs noticeably faster in this mode.
  50.  
  51.      -scale _M/_N
  52.           Scale the output image by a factor M/N.  Currently  the
  53.           scale factor must be 1/1, 1/2, 1/4, or 1/8.  Scaling is
  54.           handy if the image is larger than  your  screen;  also,
  55.           djpeg runs much faster when scaling down the output.
  56.  
  57.      -bmp Select  BMP  output  format  (Windows  flavor).   8-bit
  58.           colormapped  format is emitted if -colors or -grayscale
  59.           is specified, or if the JPEG file is gray-scale; other-
  60.           wise, 24-bit full-color format is emitted.
  61.  
  62.      -gif Select GIF output format.  Since GIF does  not  support
  63.           more  than  256  colors, -colors 256 is assumed (unless
  64.           you specify a smaller number of colors).
  65.  
  66.      -os2 Select BMP output  format  (OS/2  1.x  flavor).   8-bit
  67.           colormapped  format is emitted if -colors or -grayscale
  68.           is specified, or if the JPEG file is gray-scale; other-
  69.           wise, 24-bit full-color format is emitted.
  70.  
  71.      -pnm Select PBMPLUS (PPM/PGM) output  format  (this  is  the
  72.           default  format).   PGM  is emitted if the JPEG file is
  73.           gray-scale or if -grayscale is specified; otherwise PPM
  74.           is emitted.
  75.  
  76.      -rle Select RLE output format.  (Requires URT library.)
  77.  
  78.      -targa
  79.           Select Targa output format.  Gray-scale format is emit-
  80.           ted  if the JPEG file is gray-scale or if -grayscale is
  81.           specified; otherwise, colormapped format is emitted  if
  82.           -colors is specified; otherwise, 24-bit full-color for-
  83.           mat is emitted.
  84.  
  85.      Switches for advanced users:
  86.  
  87.      -dct int
  88.           Use integer DCT method (default).
  89.  
  90.      -dct fast
  91.           Use fast integer DCT (less accurate).
  92.  
  93.      -dct float
  94.           Use  floating-point  DCT  method.   The  floating-point
  95.           method  is  the  most accurate, but will be the slowest
  96.           unless  your  machine  has  very  fast   floating-point
  97.           hardware.  Also note that results of the floating-point
  98.           method may vary slightly  across  machines,  while  the
  99.           integer  methods  should  give  the same results every-
  100.           where.  The fast integer method is much  less  accurate
  101.           than the other two.
  102.  
  103.      -dither fs
  104.           Use Floyd-Steinberg dithering in color quantization.
  105.  
  106.      -dither ordered
  107.           Use ordered dithering in color quantization.
  108.  
  109.      -dither none
  110.           Do  not  use  dithering  in  color  quantization.    By
  111.           default,  Floyd-Steinberg  dithering  is  applied  when
  112.           quantizing colors; this is slow  but  usually  produces
  113.           the  best  results.   Ordered  dither  is  a compromise
  114.           between speed and quality; no  dithering  is  fast  but
  115.           usually  looks awful.  Note that these switches have no
  116.           effect  unless  color  quantization  is   being   done.
  117.           Ordered dither is only available in -onepass mode.
  118.  
  119.      -map _f_i_l_e
  120.           Quantize to the colors  used  in  the  specified  image
  121.           file.  This is useful for producing multiple files with
  122.           identical color maps, or for forcing a  predefined  set
  123.           of  colors  to  be used.  The _f_i_l_e must be a GIF or PPM
  124.           file. This option overrides -colors and -onepass.
  125.  
  126.      -nosmooth
  127.           Use a faster, lower-quality upsampling routine.
  128.  
  129.      -onepass
  130.           Use one-pass instead of  two-pass  color  quantization.
  131.           The  one-pass  method  is faster and needs less memory,
  132.           but it produces a  lower-quality  image.   -onepass  is
  133.           ignored  unless you also say -colors _N.  Also, the one-
  134.           pass method is always used for gray-scale  output  (the
  135.           two-pass method is no improvement then).
  136.  
  137.      -maxmemory _N
  138.           Set limit for amount of memory  to  use  in  processing
  139.           large  images.  Value is in thousands of bytes, or mil-
  140.           lions of bytes if "M" is attached to the  number.   For
  141.           example,  -max 4m selects 4000000 bytes.  If more space
  142.           is needed, temporary files will be used.
  143.  
  144.      -outfile _n_a_m_e
  145.           Send output image to the named file,  not  to  standard
  146.           output.
  147.  
  148.      -verbose
  149.           Enable debug printout.  More  -v's  give  more  output.
  150.           Also, version information is printed at startup.
  151.  
  152.      -debug
  153.           Same as -verbose.
  154.  
  155. EXAMPLES
  156.      This example decompresses the JPEG file  foo.jpg,  automati-
  157.      cally  quantizes  to 256 colors, and saves the output in GIF
  158.      format in foo.gif:
  159.  
  160.           djpeg -gif _f_o_o._j_p_g > _f_o_o._g_i_f
  161.  
  162. HINTS
  163.      To get a quick preview  of  an  image,  use  the  -grayscale
  164.      and/or  -scale  switches.   -grayscale  -scale  1/8  is  the
  165.      fastest case.
  166.  
  167.      Several options are available that trade off  image  quality
  168.      to gain speed.  -fast turns on the recommended settings.
  169.  
  170.      -dct fast and/or -nosmooth gain speed at a  small  sacrifice
  171.      in   quality.    When  producing  a  color-quantized  image,
  172.      -onepass -dither ordered is fast but much lower quality than
  173.      the  default  behavior.   -dither  none  may give acceptable
  174.      results in two-pass mode, but is seldom  tolerable  in  one-
  175.      pass mode.
  176.  
  177.      If you are fortunate enough to have very fast floating point
  178.      hardware, -dct float may be even faster than -dct fast.
  179.  
  180. ENVIRONMENT
  181.      JPEGMEM
  182.           If this environment variable is set, its value  is  the
  183.           default  memory  limit.   The  value  is  specified  as
  184.           described for the -maxmemory switch.  JPEGMEM overrides
  185.           the  default  value specified when the program was com-
  186.           piled, and itself is overridden by  an  explicit  -max-
  187.           memory.
  188.  
  189. SEE ALSO
  190.      cjpeg(1), rdjpgcom(1), wrjpgcom(1)
  191.      ppm(5), pgm(5)
  192.      Wallace, Gregory K.  "The  JPEG  Still  Picture  Compression
  193.      Standard",  Communications  of the ACM, April 1991 (vol. 34,
  194.      no. 4), pp. 30-44.
  195.  
  196. AUTHOR
  197.      Independent JPEG Group
  198.  
  199. BUGS
  200.      Arithmetic coding is not supported for legal reasons.
  201.  
  202.      Still not as fast as we'd like.
  203.  
  204.